/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package SessionBeans.web.beans;

import entities.Folder;
import entities.FolderChangeLog;
import entities.Rights;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Tomas
 */
public class FolderInfo {

    protected Folder value;
    protected List<FolderInfo> folders;
    protected List<FileInfo> files;
    protected FolderChangeLog lastChangeLog;
    protected Rights rights;
    protected OwnerUser owner;
    protected FolderTypeEnum type;


    public FolderInfo(Folder value, FolderChangeLog lastChangeLog, FolderTypeEnum type, OwnerUser owner, Rights rights) {
        this.value = value;
        this.lastChangeLog = lastChangeLog;
        this.type = type;
        this.owner = owner;
        this.rights = rights;
        folders = new ArrayList<>();
        files = new ArrayList<>();
    }

    public FolderInfo(Folder value, List<FolderInfo> folders, List<FileInfo> files, FolderChangeLog lastChangeLog, Rights rights, OwnerUser owner, FolderTypeEnum type) {
        this.value = value;
        this.folders = folders;
        this.files = files;
        this.lastChangeLog = lastChangeLog;
        this.rights = rights;
        this.owner = owner;
        this.type = type;
    }

    public Folder getValue() {
        return value;
    }

    public void setValue(Folder value) {
        this.value = value;
    }

    public List<FileInfo> getFiles() {
        return files;
    }

    public void setFiles(List<FileInfo> files) {
        this.files = files;
    }

    public List<FolderInfo> getFolders() {
        return folders;
    }

    public void setFolders(List<FolderInfo> folders) {
        this.folders = folders;
    }    
    
    public FolderChangeLog getChangeChangeLog() {
        return lastChangeLog;
    }

    public void setChangeChangeLog(FolderChangeLog changeChangeLog) {
        this.lastChangeLog = changeChangeLog;
    }

    public OwnerUser getOwner() {
        return owner;
    }

    public void setOwner(OwnerUser owner) {
        this.owner = owner;
    }

    public int getRightsLevel() {
        return rights.getTypeCode();
    }

    public Rights getRights() {
        return rights;
    }
    
    

    public void setRights(Rights rights) {
        this.rights = rights;
    }

    public FolderTypeEnum getType() {
        return type;
    }

    public void setType(FolderTypeEnum type) {
        this.type = type;
    }
    
    
}
